import * as PIXI from 'pixi.js'
import { getPixi } from '@renderer/store/modules/usePixiStore'

export default async (): Promise<void> => {
  // LOGO
  const bgSearchContainer = getPixi('searchBg')
  const bundle = await PIXI.Assets.loadBundle('cardBook')
  const texture = new PIXI.Texture({
    source: bundle.bxlogo,
    frame: new PIXI.Rectangle(8, 14, 323, 489),
  })
  const sprite = new PIXI.Sprite(texture)
  sprite.anchor.set(0.5)
  sprite.scale.set(0.4)
  sprite.position.set(bgSearchContainer.width / 2, bgSearchContainer.height - sprite.height / 2)
  bgSearchContainer.addChild(sprite)
}
